package cn.xiaoxiang.basic.util;

import cn.xiaoxiang.basic.jwt.UserInfo;

public class ThreadLocalUtil {

    private static final ThreadLocal<UserInfo> local = new ThreadLocal<UserInfo>();

    public static void setUserInfo(UserInfo userInfo) {
        local.set(userInfo);
    }

    public static UserInfo getUserInfo() {
        return local.get();
    }

    public static void remove() {
        local.remove();
    }
}
